package cn.lhz.team.group.model;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.persistence.*;

import java.sql.Timestamp;

/**
 * @author lhz
 */
@Component(GroupModel.NAME + ".model")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
@Entity
@Table(name = "g_group")
public class GroupModel{
    public static final String NAME = "team.group";

    private String id;//队伍id
    private int gType; // 队伍类型
    private String gInitiator; // 发起人
    private String gCrewNum; // 现有人数
    private String gCrews; // 队伍人员
    private String gStatus; // 队伍状态
    private Timestamp gCreateTime; // 创建时间
    private Timestamp gEndTime; // 结束时间
    private Timestamp gFinishTime; // 完成时间

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "g_id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name = "g_type")
    public int getGType() {
        return gType;
    }

    public void setGType(int gType) {
        this.gType = gType;
    }

    @Column(name = "g_initiator")
    public String getGInitiator() {
        return gInitiator;
    }

    public void setGInitiator(String gInitiator) {
        this.gInitiator = gInitiator;
    }

    @Column(name = "g_crew_num")
    public String getGCrewNum() {
        return gCrewNum;
    }

    public void setGCrewNum(String gCrewNum) {
        this.gCrewNum = gCrewNum;
    }

    @Column(name = "g_crews")
    public String getGCrews() {
        return gCrews;
    }

    public void setGCrews(String gCrews) {
        this.gCrews = gCrews;
    }

    @Column(name = "g_status")
    public String getGStatus() {
        return gStatus;
    }

    public void setGStatus(String gStatus) {
        this.gStatus = gStatus;
    }

    @Column(name = "g_create_time")
    public Timestamp getGCreateTime() {
        return gCreateTime;
    }

    public void setGCreateTime(Timestamp gCreateTime) {
        this.gCreateTime = gCreateTime;
    }

    @Column(name = "g_end_time")
    public Timestamp getGEndTime() {
        return gEndTime;
    }

    public void setGEndTime(Timestamp gEndTime) {
        this.gEndTime = gEndTime;
    }

    @Column(name = "g_finish_time")
    public Timestamp getGFinishTime() {
        return gFinishTime;
    }

    public void setGFinishTime(Timestamp gFinishTime) {
        this.gFinishTime = gFinishTime;
    }
}
